Skip to content

feat(coverage): add Python 3.14 support and bump coverage.py to 7.10.7#3764

Merged
aignas merged 3 commits intobazel-contrib:mainfrom
Syndic:coverage-py-7.10.7-cp314
May 10, 2026
Merged

feat(coverage): add Python 3.14 support and bump coverage.py to 7.10.7#3764
aignas merged 3 commits intobazel-contrib:mainfrom
Syndic:coverage-py-7.10.7-cp314

Conversation

@Syndic
Copy link
Copy Markdown
Contributor

@Syndic Syndic commented May 9, 2026

On rules_python 2.0.0, python.toolchain(configure_coverage_tool = True) is a silent no-op when python_version = "3.14": the bundled coverage.py wheel set in python/private/coverage_deps.bzl covers cp310–cp313 only, so bazel coverage produces zero-byte per-test lcov files for py_test targets. This PR bumps the bundled coverage to 7.10.7 (which ships cp39–cp314 wheels, including freethreaded variants for cp313+) and regenerates the wheel set.

  • Regenerate coverage_deps.bzl against coverage 7.10.7
  • Add cp314 (incl. freethreaded cp314t variants) to the bundled set
  • Drop cp38 from the supported set (coverage.py 7.6.2 dropped Python 3.8)
  • Extend update_coverage_deps.py's _supported_platforms map with the newer wheel platform tags (manylinux1_x86_64, macosx_10_13_x86_64) used by coverage 7.10.7
  • Narrow coverage.patch context to apply against the 7.10.7 coverage/__main__.py layout
  • Document the bundled coverage version range in docs/coverage.md

Verification:

  • bazel test //tests/python:python_tests //tests/py_runtime:py_runtime_tests --test_tag_filters=-integration-test → 37/37 pass (incl. test_coverage_tool_executable, test_coverage_tool_plain_files)
  • E2E: local_path_override this branch into a minimal external workspace, set python_version = "3.14" with configure_coverage_tool = True, run bazel coverage on a py_test → produces a non-empty per-test lcov with SF:, FNDA: reflecting actual call counts, and LH: non-zero

Syndic added 2 commits May 9, 2026 14:00
- Regenerate coverage_deps.bzl against coverage 7.10.7
- Add cp314 (incl. freethreaded cp314t variants) to the bundled set
- Drop cp38 (coverage.py 7.6.2 dropped Python 3.8)
- Teach update_coverage_deps.py the newer wheel platform tags
  (manylinux1_x86_64, macosx_10_13_x86_64) used by coverage 7.10.7
- Narrow coverage.patch context to apply against the 7.10.7
  coverage/__main__.py layout
- coverage.md: note that configure_coverage_tool=True is only effective
  for the Python versions the bundled coverage wheel set covers
  (CPython 3.9-3.14, freethreaded for 3.13+); outside that range it is
  a silent no-op and produces empty lcov.
- devguide.md: bump the example version in the regen command from
  7.6.1 to 7.10.7 to match what is now bundled.
@Syndic Syndic requested review from aignas and rickeylev as code owners May 9, 2026 21:41
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates coverage.py to 7.10.7, adds support for Python 3.14 (including freethreaded variants), and drops support for Python 3.8. The changes span dependency definitions, documentation, and the dependency update tool. Feedback was provided regarding the placement of the CHANGELOG entry, suggesting it be moved to a more appropriate section.

Comment thread CHANGELOG.md Outdated
Per review feedback on PR bazel-contrib#3764, "add support for python 3.14 and bump
coverage.py" is structurally an addition, not a fix. Mirrors the
placement of the prior 3.13 entry (bazel-contrib#2265). Splits the python 3.8 drop
into its own Removed entry rather than burying it in the Added line.
@Syndic Syndic changed the title fix(coverage): bump coverage.py to 7.10.7 for Python 3.14 support feat(coverage): add Python 3.14 support and bump coverage.py to 7.10.7 May 9, 2026
Copy link
Copy Markdown
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Comment thread docs/coverage.md
:::{note}
The bundled `coverage` wheel set covers CPython 3.9 through 3.14 (with
freethreaded variants for 3.13+). For Python versions outside that range,
`configure_coverage_tool = True` is a silent no-op and `bazel coverage` will
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be happy to receive a PR for bzlmod that would print a warning if the coverage tool was not found.

@aignas aignas added this pull request to the merge queue May 10, 2026
Merged via the queue into bazel-contrib:main with commit 9dc505b May 10, 2026
3 checks passed
@Syndic Syndic deleted the coverage-py-7.10.7-cp314 branch May 10, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants